package xyz.scoder;

/**
 * 简单工厂类
 */
public class SimplePizzaFactory {
    public static Pizza createPizza(String type) {
        Pizza pizza = null;
        switch (type) {
            case "cheese":
                pizza = new CheesePizza();
                break;
            case "clam":
                pizza = new ClamPizza();
                break;
            default:
                System.out.println("Sorry，" + type + " pizza 暂未加入肯德基豪华午餐");
                break;
        }
        return pizza;
    }
}
